package netjava;

public class Main {
//    启动一个线程，每隔 2 秒钟打印 指定的内容，10 秒之后关闭线程
    public static void main(String[] args) {
        ThreadDayin threadDayin = new ThreadDayin(" 伟大的中国人民 ");
        threadDayin.setName("1号打印机");
        threadDayin.start();
//        ThreadUtil.sleep(10000);
//        ThreadUtil.sleepSecond(10);
       try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        threadDayin.close();
        System.out.println("拜拜！");

    }
}
